package com.wh.springboot.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author elsy
 * @since 2023-03-09
 */
@Getter
@Setter
@TableName("menus")
@ApiModel(value = "Menu对象", description = "")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("父级id")
    private Integer pid;

    @ApiModelProperty("菜单栏类型")
    private String type;

    @ApiModelProperty("菜单的标题")
    private String title;

    @ApiModelProperty("权限分配")
    private String permission;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("跳转的路径")
    private String href;

    @ApiModelProperty("默认打开状态")
    private Integer open;

    @ApiModelProperty("排序字段")
    private Integer ordernum;

    //字段实体类里面有 数据库表格中没有
    @TableField(exist = false)
    private List<Menu> children;


    private String pagePath;
    private String pageFile;
}
